const Login = resolve => require(['./components/Login.vue'], resolve);
const NotFound = resolve => require(['./components/404.vue'], resolve);
const Home = resolve => require(['./components/Home.vue'], resolve);
const Main = resolve => require(['./components/Main.vue'], resolve);
const Index = resolve => require(['./components/common/index.vue'], resolve);
const My = resolve => require(['./components/common/My.vue'], resolve);

let routes = [{
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    { path: '/main', component: Main, hidden: true },
    {
        path: '/Home',
        component: Home,
        children: [{
                path: '/Index/',
                component: Index,
                hidden: true
            },
            {
                path: '/My/',
                component: My,
                hidden: true
            }
        ]
    },
    {
        path: '/Home/Index',
        component: Index,
        name: ''
    },
    {
        path: '*',
        hidden: true,
        redirect: {
            path: '/404'
        }
    }
];

export default routes;